package com.example.leetcode;

import java.util.ArrayList;
import java.util.List;

public class HW11 {
    public static void main(String[] args) {
        String s ="asdbuiodevauufgh";
        String s1 ="a,e,i,o,u,A,E,I,O,U";
        char[] targe = s.toCharArray();

    /*    List<Integer> counts= new ArrayList<>();
        for (char c:targe){
            if (count!=0){
                counts.add(count);
            }
            if (s1.contains(String.valueOf(c))){
                count++;
            }else {
                count=0;
            }
        }
        System.out.println(counts.stream().reduce(Integer::max).get());*/
        int i=0;
        int max=0;
        int count=0;
        while (i<targe.length){
           if(s1.contains(String.valueOf(targe[i])) ){
               count++;
           }else {
            max= Math.max(max,count);
               count=0;
           }
            i++;

        }
        System.out.println(max);

    }
}
